﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace CKY.AgentPlatform.Migrations
{
    /// <inheritdoc />
    public partial class InitialCreate : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_McpServers",
                table: "McpServers");

            migrationBuilder.RenameTable(
                name: "McpServers",
                newName: "AppMcpServers");

            migrationBuilder.RenameIndex(
                name: "IX_McpServers_Status",
                table: "AppMcpServers",
                newName: "IX_AppMcpServers_Status");

            migrationBuilder.RenameIndex(
                name: "IX_McpServers_Name",
                table: "AppMcpServers",
                newName: "IX_AppMcpServers_Name");

            migrationBuilder.RenameIndex(
                name: "IX_McpServers_IsActive",
                table: "AppMcpServers",
                newName: "IX_AppMcpServers_IsActive");

            migrationBuilder.RenameIndex(
                name: "IX_McpServers_Host",
                table: "AppMcpServers",
                newName: "IX_AppMcpServers_Host");

            migrationBuilder.AddPrimaryKey(
                name: "PK_AppMcpServers",
                table: "AppMcpServers",
                column: "Id");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_AppMcpServers",
                table: "AppMcpServers");

            migrationBuilder.RenameTable(
                name: "AppMcpServers",
                newName: "McpServers");

            migrationBuilder.RenameIndex(
                name: "IX_AppMcpServers_Status",
                table: "McpServers",
                newName: "IX_McpServers_Status");

            migrationBuilder.RenameIndex(
                name: "IX_AppMcpServers_Name",
                table: "McpServers",
                newName: "IX_McpServers_Name");

            migrationBuilder.RenameIndex(
                name: "IX_AppMcpServers_IsActive",
                table: "McpServers",
                newName: "IX_McpServers_IsActive");

            migrationBuilder.RenameIndex(
                name: "IX_AppMcpServers_Host",
                table: "McpServers",
                newName: "IX_McpServers_Host");

            migrationBuilder.AddPrimaryKey(
                name: "PK_McpServers",
                table: "McpServers",
                column: "Id");
        }
    }
}
